<template>
  <div>{{ obj.name }}</div>
  <button @click="changeName()">改变数据</button>
</template>
<script setup>
//reactive只能定义对象数据
import { reactive } from "vue";
let obj = reactive({ name: "zhailei", age: 20 });

function changeName() {
  obj.name = "13";
}
</script>
<style scoped></style>
